package com.tanhua;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@MapperScan("com.tanhua.mapper")
public class ServiceApplication {
    public static void main(String[] args) {
        //只加载名称叫application.yml的文件
        SpringApplication.run(ServiceApplication.class,args);
    }

    /*集成mybatis-plus的分页插件*/
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }
}
